package com.gfxy.common.util;

import com.gfxy.common.model.WeekEnum;

import java.util.Calendar;
import java.util.Date;

/**
 * @author: lijixin 2019-05-30
 */
public class DateUtils {


    /**
     * 获取当前时间
     * @return
     */
    public static WeekEnum getWeekOfCurrent() {
        Date date = new Date();

        Calendar cd = Calendar.getInstance();
        cd.setTime(date);
        int wd = cd.get(Calendar.DAY_OF_WEEK);

        return WeekEnum.getWeekEnumByIndex(wd);
    }
}
